package com.ebuy.mall.dao;

import com.ebuy.mall.entity.EBuyMallUserCouponRecord;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EBuyMallUserCouponRecordMapper {
    int deleteByPrimaryKey(Long couponUserId);

    int insert(EBuyMallUserCouponRecord record);

    int insertSelective(EBuyMallUserCouponRecord record);

    EBuyMallUserCouponRecord selectByPrimaryKey(Long couponUserId);

    int updateByPrimaryKeySelective(EBuyMallUserCouponRecord record);

    int updateByPrimaryKey(EBuyMallUserCouponRecord record);

    int getUserCouponCount(Long userId, Long couponId);

    int getCouponCount(Long couponId);

    List<EBuyMallUserCouponRecord> selectMyCoupons(Long userId);

    List<EBuyMallUserCouponRecord> selectMyAvailableCoupons(Long userId);

    EBuyMallUserCouponRecord getUserCouponByOrderId(Long orderId);
}
